
from flask import Flask, abort

app =Flask(__name__)

@app.route("/")
def hello():
    abort(403)
    return "hello"

@app.errorhandler(404)
def page_not_found(e):
    print(e)
    return "页面找不到"
@app.errorhandler(403)
def forrden(e):
    print(e)
    return "禁止访问"

if __name__ == '__main__':
    app.run(debug=True)